#ifndef NSI_SPIKE_UTIL_DEFAULT_SIGNAL_H
#define NSI_SPIKE_UTIL_DEFAULT_SIGNAL_H

#include "signal_base.h"

namespace nsi {
namespace spike {

// This signal calls the default signal function
class default_signal
  : public signal_base
{
public:

  // Constructor given a signal
  explicit default_signal(int value);

  // Copy constructor
  default_signal(const default_signal& other);
    
  // Destructor
  virtual ~default_signal();

  // Assignment operator
  default_signal& operator=(const default_signal& other);
   
  // Create the signal
  bool create();
  
  // Operator which handles the signal
  virtual bool operator()(signal_info_type* info, void* ucontext);
  
  // Accessors
  const int value() const
  {
    return value_;
  }

private:
  // Signal value
  int value_;
};

} // namespace spike
} // namespace nsi

#endif // !NSI_SPIKE_UTIL_DEFAULT_SIGNAL_H
